Optimal. Leaf size=92 \[ \frac {b (b d-a e) (B d-A e) x}{e^3}-\frac {(B d-A e) (a+b x)^2}{2 e^2}+\frac {B (a+b x)^3}{3 b e}-\frac {(b d-a e)^2 (B d-A e) \log (d+e x)}{e^4} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 1, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {78}
\begin {gather*} -\frac {(b d-a e)^2 (B d-A e) \log (d+e x)}{e^4}+\frac {b x (b d-a e) (B d-A e)}{e^3}-\frac {(a+b x)^2 (B d-A e)}{2 e^2}+\frac {B (a+b x)^3}{3 b e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rubi steps
\begin {align*} \int \frac {(a+b x)^2 (A+B x)}{d+e x} \, dx &=\int \left (-\frac {b (b d-a e) (-B d+A e)}{e^3}+\frac {b (-B d+A e) (a+b x)}{e^2}+\frac {B (a+b x)^2}{e}+\frac {(-b d+a e)^2 (-B d+A e)}{e^3 (d+e x)}\right ) \, dx\\ &=\frac {b (b d-a e) (B d-A e) x}{e^3}-\frac {(B d-A e) (a+b x)^2}{2 e^2}+\frac {B (a+b x)^3}{3 b e}-\frac {(b d-a e)^2 (B d-A e) \log (d+e x)}{e^4}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 102, normalized size = 1.11 \begin {gather*} \frac {e x \left (6 a^2 B e^2+6 a b e (-2 B d+2 A e+B e x)+b^2 \left (3 A e (-2 d+e x)+B \left (6 d^2-3 d e x+2 e^2 x^2\right )\right )\right )-6 (b d-a e)^2 (B d-A e) \log (d+e x)}{6 e^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 161, normalized size = 1.75
method | result | size |
norman | \(\frac {\left (2 A a b \,e^{2}-A \,b^{2} d e +B \,a^{2} e^{2}-2 B a b d e +b^{2} B \,d^{2}\right ) x}{e^{3}}+\frac {b \left (A b e +2 B a e -B b d \right ) x^{2}}{2 e^{2}}+\frac {b^{2} B \,x^{3}}{3 e}+\frac {\left (a^{2} A \,e^{3}-2 A a b d \,e^{2}+A \,b^{2} d^{2} e -B \,a^{2} d \,e^{2}+2 B a b \,d^{2} e -b^{2} B \,d^{3}\right ) \ln \left (e x +d \right )}{e^{4}}\) | \(148\) |
default | \(\frac {\frac {1}{3} b^{2} B \,x^{3} e^{2}+\frac {1}{2} A \,b^{2} e^{2} x^{2}+B a b \,e^{2} x^{2}-\frac {1}{2} B \,b^{2} d e \,x^{2}+2 A a b \,e^{2} x -A \,b^{2} d e x +B \,a^{2} e^{2} x -2 B a b d e x +B \,b^{2} d^{2} x}{e^{3}}+\frac {\left (a^{2} A \,e^{3}-2 A a b d \,e^{2}+A \,b^{2} d^{2} e -B \,a^{2} d \,e^{2}+2 B a b \,d^{2} e -b^{2} B \,d^{3}\right ) \ln \left (e x +d \right )}{e^{4}}\) | \(161\) |
risch | \(\frac {b^{2} B \,x^{3}}{3 e}+\frac {A \,b^{2} x^{2}}{2 e}+\frac {B a b \,x^{2}}{e}-\frac {B \,b^{2} d \,x^{2}}{2 e^{2}}+\frac {2 A a b x}{e}-\frac {A \,b^{2} d x}{e^{2}}+\frac {B \,a^{2} x}{e}-\frac {2 B a b d x}{e^{2}}+\frac {B \,b^{2} d^{2} x}{e^{3}}+\frac {\ln \left (e x +d \right ) a^{2} A}{e}-\frac {2 \ln \left (e x +d \right ) A a b d}{e^{2}}+\frac {\ln \left (e x +d \right ) A \,b^{2} d^{2}}{e^{3}}-\frac {\ln \left (e x +d \right ) B \,a^{2} d}{e^{2}}+\frac {2 \ln \left (e x +d \right ) B a b \,d^{2}}{e^{3}}-\frac {\ln \left (e x +d \right ) b^{2} B \,d^{3}}{e^{4}}\) | \(197\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.32, size = 155, normalized size = 1.68 \begin {gather*} -{\left (B b^{2} d^{3} - A a^{2} e^{3} - {\left (2 \, B a b e + A b^{2} e\right )} d^{2} + {\left (B a^{2} e^{2} + 2 \, A a b e^{2}\right )} d\right )} e^{\left (-4\right )} \log \left (x e + d\right ) + \frac {1}{6} \, {\left (2 \, B b^{2} x^{3} e^{2} - 3 \, {\left (B b^{2} d e - 2 \, B a b e^{2} - A b^{2} e^{2}\right )} x^{2} + 6 \, {\left (B b^{2} d^{2} + B a^{2} e^{2} + 2 \, A a b e^{2} - {\left (2 \, B a b e + A b^{2} e\right )} d\right )} x\right )} e^{\left (-3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 148, normalized size = 1.61 \begin {gather*} \frac {1}{6} \, {\left (6 \, B b^{2} d^{2} x e + {\left (2 \, B b^{2} x^{3} + 3 \, {\left (2 \, B a b + A b^{2}\right )} x^{2} + 6 \, {\left (B a^{2} + 2 \, A a b\right )} x\right )} e^{3} - 3 \, {\left (B b^{2} d x^{2} + 2 \, {\left (2 \, B a b + A b^{2}\right )} d x\right )} e^{2} - 6 \, {\left (B b^{2} d^{3} - A a^{2} e^{3} - {\left (2 \, B a b + A b^{2}\right )} d^{2} e + {\left (B a^{2} + 2 \, A a b\right )} d e^{2}\right )} \log \left (x e + d\right )\right )} e^{\left (-4\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.24, size = 117, normalized size = 1.27 \begin {gather*} \frac {B b^{2} x^{3}}{3 e} + x^{2} \left (\frac {A b^{2}}{2 e} + \frac {B a b}{e} - \frac {B b^{2} d}{2 e^{2}}\right ) + x \left (\frac {2 A a b}{e} - \frac {A b^{2} d}{e^{2}} + \frac {B a^{2}}{e} - \frac {2 B a b d}{e^{2}} + \frac {B b^{2} d^{2}}{e^{3}}\right ) - \frac {\left (- A e + B d\right ) \left (a e - b d\right )^{2} \log {\left (d + e x \right )}}{e^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.77, size = 162, normalized size = 1.76 \begin {gather*} -{\left (B b^{2} d^{3} - 2 \, B a b d^{2} e - A b^{2} d^{2} e + B a^{2} d e^{2} + 2 \, A a b d e^{2} - A a^{2} e^{3}\right )} e^{\left (-4\right )} \log \left ({\left | x e + d \right |}\right ) + \frac {1}{6} \, {\left (2 \, B b^{2} x^{3} e^{2} - 3 \, B b^{2} d x^{2} e + 6 \, B b^{2} d^{2} x + 6 \, B a b x^{2} e^{2} + 3 \, A b^{2} x^{2} e^{2} - 12 \, B a b d x e - 6 \, A b^{2} d x e + 6 \, B a^{2} x e^{2} + 12 \, A a b x e^{2}\right )} e^{\left (-3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.07, size = 159, normalized size = 1.73 \begin {gather*} x\,\left (\frac {B\,a^2+2\,A\,b\,a}{e}-\frac {d\,\left (\frac {A\,b^2+2\,B\,a\,b}{e}-\frac {B\,b^2\,d}{e^2}\right )}{e}\right )+x^2\,\left (\frac {A\,b^2+2\,B\,a\,b}{2\,e}-\frac {B\,b^2\,d}{2\,e^2}\right )+\frac {\ln \left (d+e\,x\right )\,\left (-B\,a^2\,d\,e^2+A\,a^2\,e^3+2\,B\,a\,b\,d^2\,e-2\,A\,a\,b\,d\,e^2-B\,b^2\,d^3+A\,b^2\,d^2\,e\right )}{e^4}+\frac {B\,b^2\,x^3}{3\,e} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________